package com.enation.app.javashop.api.client;

import com.enation.app.javashop.framework.database.WebPage;
import com.enation.app.javashop.model.member.dto.DepositeParamDTO;
import com.enation.app.javashop.model.trade.deposite.DepositeLogDO;
import com.enation.app.javashop.service.trade.deposite.DepositeLogManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

/**
 * @description: 预存款记录客户端实现
 * @author: liuyulei
 * @create: 2020-01-02 16:32
 * @version:1.0
 * @since:7.1.4
 **/
@RestController
@RequestMapping("/client/trade/deposite-log")
@Validated
@ApiIgnore
public class DepositeLogClientController{


    @Autowired
    private DepositeLogManager depositeLogManager;

    @PostMapping
    public void add(@RequestBody DepositeLogDO logDO) {
        depositeLogManager.add(logDO);
    }

    @PostMapping("/list")
    public WebPage list(@RequestBody DepositeParamDTO paramDTO) {
        return this.depositeLogManager.list(paramDTO);
    }
}
